Update naked to use the attribute template#1908
Update naked to use the attribute template#1908ehuss wants to merge 7 commits intorust-lang:masterfrom
naked to use the attribute template#1908Conversation
src/attributes/codegen.md
Outdated
| - [Free functions][items.fn] | ||
| - [Inherent associated functions][items.associated.fn] | ||
| - [Trait impl functions][items.impl.trait] | ||
| - [Trait definition functions][items.traits] with a body |
There was a problem hiding this comment.
does this work
| - [Trait definition functions][items.traits] with a body | |
| - [Trait][items.traits] [associated functions][items.associated.fn] with a body |
There was a problem hiding this comment.
This wording can be ambiguous, since it is unclear if it is an associated function in a trait definition or a trait impl. The original wording was specifically chosen to avoid that ambiguity and contrast with the previous item.
There was a problem hiding this comment.
initially wanted to link this to items.traits.associated-item-decls, due to being more specific, because items.traits was too general
- [Trait definition functions][items.traits.associated-item-decls] with a body
is that alright
|
just 1 comment, otherwise this is good |
This comment has been minimized.
This comment has been minimized.
To follow the attribute template, and to simplify the wording a little.
Naked attributes cannot have the "Rust" ABI. https://github.com/rust-lang/rust/blob/aae43c4532690153af7465227816c93036bb1604/compiler/rustc_passes/src/check_attr.rs#L641-L652
More closely align with the template, and some minor word tweaks.
|
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
New rules:
attributes.codegen.naked.syntaxattributes.codegen.naked.allowed-positionsattributes.codegen.naked.duplicatesattributes.codegen.naked.target_featureattributes.codegen.naked.abiRenamed rules:
attributes.codegen.naked.unsafe-attributeis nowattributes.codegen.naked.unsafe